package com.hmjk.health.util;

import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;

public class NameComparator implements Comparator<Object>{
	@Override
	public int compare(Object arg0, Object arg1) {
		DEV_DATA one = (DEV_DATA)arg0;
		DEV_DATA two = (DEV_DATA)arg1;
		Collator ca = Collator.getInstance(Locale.CHINA);
		int flags = 0;
		if (ca.compare(one.name,two.name) < 0) {
			flags = -1;
		}else if(ca.compare(one.name,two.name) > 0) {
			flags = 1;
		}else{
			flags = 0;
		}
		return flags;
	}
}
